package pprg.util;

import java.util.Random;

public class Util {

	public static int[] randomNumbers(int count) {
		Random rand = new Random();
		int array[] = new int[count];
		for (int i = 0; i < array.length; i++) {
			array[i] = rand.nextInt(1000000);	//random number between 0 - 1 000 000
		}
		return array;
	}

	public static boolean isSorted(int[] values) {

		boolean sorted = true;
		for (int i = 0; i < values.length - 1; i++) {
			if (values[i] > values[i + 1]) {
				sorted = false;
				break;
			}
		}
		return sorted;
	}
}
